package com.nuhu.controller;

import com.nuhu.pojo.CustomerServiceRecord;
import com.nuhu.service.ServiceOnlineRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ServiceOnlineRecordController {
    @Autowired
    private ServiceOnlineRecordService serviceOnlineRecordService;

    @RequestMapping("/serviceOnline1")
    public String serviceOnlineRecordInsert(@RequestBody CustomerServiceRecord customerServiceRecord){
        serviceOnlineRecordService.serviceOnlineRecordInsert(customerServiceRecord);
        return "service Online Record Insert success";
    }

    @RequestMapping("/serviceOnline2")
    public CustomerServiceRecord getServiceOnlineRecord(){
        return serviceOnlineRecordService.getServiceOnlineRecord();
    }
}
